home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / scope / 051-075 / scopedisk55 / dirk2 / dirk.h < prev    next >
C/C++ Source or Header  |  1995-03-18  |  3KB  |  96 lines

  1. /***************************************************************************
  2.     1/89
  3.  
  4.         DIRK v2.0 -- Tune workbench colors to system performance
  5.  
  6.         Copyright (C) 1989 by Daniel Elbaum
  7.  
  8.         This software is freely redistributable provided that:
  9.         the four files which comprise it (dirk, dirk.doc, dirk.h,
  10.         adjust.c, main.c, sys, window.c) remain intact; all
  11.         copyright notices contained in any of the aforementioned
  12.         files remain intact; and no fee beyond reasonable remuneration
  13.         for collation and distribution be charged for use and/or
  14.         distribution.
  15.  
  16. ***************************************************************************/
  17.  
  18.  
  19. #include <exec/types.h>
  20. #include <exec/exec.h>
  21. #include <exec/execbase.h>
  22. #include <intuition/intuition.h>
  23. #include <graphics/gfxbase.h>
  24.  
  25. #define INAM    ("intuition.library")
  26. #define GNAM    ("graphics.library")
  27. #define IREV    (1)
  28. #define GREV    (1)
  29. #define CMAX    (15)    /* max val for color component (hardware)   */
  30.  
  31. #define WINNAME ("Dirk")
  32. #define WINTOP  (0)
  33. #define WINWD   (116)
  34. #define WINHT1  (10)
  35. #define WINHT2  (115)
  36. #define WINFLAGS (WINDOWCLOSE|WINDOWDRAG|WINDOWDEPTH|RMBTRAP)
  37. #define WINIFLAGS (CLOSEWINDOW|ACTIVEWINDOW|INACTIVEWINDOW|\
  38. REFRESHWINDOW|MOUSEBUTTONS)
  39. #define W_OPEN      (0)
  40. #define W_CLOSED    (1)
  41.  
  42. /*
  43.     seems odd, but really makes sense, since background
  44.     has 2 color components, and detail has 3.
  45.     These limits are to ensure enough contrast for readability.
  46. */
  47.  
  48. struct g_flags {
  49.     int gran;   /* granularity of mapping from #tasks to pen brightness */
  50.     int bsmax;  /* constant total saturation of background (red+blue)   */
  51.     int dsmax;  /* maximum detail brightness (if high, text glares)     */
  52.     int dsmin;  /* darkest gray for detail pen                          */
  53.     int dstog;  /* set to activate task watch                           */
  54.     int bstog;  /* set to activate memory watch                         */
  55.     int intvl;  /* number of ticks between updates                      */
  56.     int bd_r;   /* base detail pen red component                        */
  57.     int bd_g;   /* base detail pen green component                      */
  58.     int bd_b;   /* base detail pen blue component                       */
  59.     int lb_r;   /* low background pen red component                     */
  60.     int lb_g;   /* low background pen green component                   */
  61.     int lb_b;   /* low background pen blue component                    */
  62.     int hb_r;   /* high background pen red component                    */
  63.     int hb_g;   /* high background pen green component                  */
  64.     int hb_b;   /* high background pen blue component                   */
  65.  
  66. /* the following three are used internally only */
  67.     int db_r;   /* difference in red from low to high memory usage      */
  68.     int db_g;   /* difference in green from low to high memory usage    */
  69.     int db_b;   /* difference in blue from low to high memory usage     */
  70. };
  71.  
  72.  
  73. typedef struct IntuitionBase t_ib;
  74. typedef struct GfxBase t_gb;
  75. typedef struct g_flags t_gf;
  76.  
  77. extern struct ExecBase *SysBase;
  78.  
  79. struct IntuiMessage *GetMsg();
  80. void *OpenLibrary();
  81. ULONG AvailMem();
  82.  
  83. #ifdef MAIN
  84.  
  85. t_ib *IntuitionBase;
  86. t_gb *GfxBase;
  87.  
  88. #else
  89.  
  90. extern t_ib *IntuitionBase;
  91. extern t_gb *GfxBase;
  92.  
  93. #endif
  94.  
  95.  
  96.